package com.gmail.blackdog1987.onedollar.entity;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;

public class ResultJson implements Serializable {

	private static final long serialVersionUID = 1L;

	private String code;

	private String message;

	private Map<String, Object> resultMap;

	public ResultJson() {
		resultMap = new LinkedHashMap<String, Object>();
	}

	public ResultJson(String code, String message) {
		resultMap = new LinkedHashMap<String, Object>();
		setCode(code);
		setMessage(message);
	}
	
	public String getCode() {
		this.code = (String) resultMap.get("code");
		return code;
	}

	public void setCode(String code) {
		this.code = (String) resultMap.put("code", code);
	}

	public String getMessage() {
		this.message = (String) resultMap.get("message");
		return message;
	}

	public void setMessage(String message) {
		this.message = (String) resultMap.put("message", message);
	}

	public Map<String, Object> getResultMap() {
		return resultMap;
	}

	public void setResultMap(Map<String, Object> resultMap) {
		this.resultMap = resultMap;
	}
	
	public void put(String key, Object obj) {
		resultMap.put(key, obj);
	}
	
	

	public Map<String, Object> getResultJson(String code, String message){
		this.code = (String) resultMap.put("code", code);
		this.message = (String) resultMap.put("message", message);
		return resultMap;
	}
	
	
}
